package im.xz.cn.tpplayer1206;
import org.bukkit.ChatColor;
import org.bukkit.plugin.java.JavaPlugin;
public final class TpPlayer_1206 extends JavaPlugin {
    @Override
    public void onEnable() {
        getConfig().options().copyDefaults();
        saveDefaultConfig();
        System.out.println(ChatColor.AQUA + "-------------------------");
        System.out.println(ChatColor.LIGHT_PURPLE + "tpPlayer 插件已加载");
        System.out.println(ChatColor.AQUA + "如需帮助，请参阅https://im.xz.cn/index.php/archives/59/");
        System.out.println(ChatColor.AQUA + "");
        System.out.println(ChatColor.AQUA + "作者：夏至锐(xzrui), QQ1214621621");
        System.out.println(ChatColor.AQUA + "");
        System.out.println(ChatColor.AQUA + "您正在运行的版本是为Minecraft 1.20.6开发的，它应该兼容比它高的版本(不一定)。");
        System.out.println(ChatColor.AQUA + "-------------------------");
        getServer().getPluginManager().registerEvents(new tpp_accept(),this);
        try {
            if (getConfig().getBoolean("logoutRemove")) {
                getServer().getPluginManager().registerEvents(new tpp_logoutEvent(),this);
            }
        }catch (NullPointerException ignore) {
        }
        try {
            if (getConfig().getBoolean("removeItem")) {
                getServer().getPluginManager().registerEvents(new tpp_throw(), this);
            }else {
            }
        }catch (NullPointerException ignore) {
        }
        getCommand("tpp").setExecutor(new tpp());
        getCommand("tpplayer").setExecutor(new tpp());
        getCommand("传送玩家").setExecutor(new tpp());
        getCommand("传送至").setExecutor(new tpp());
    }
    @Override
    public void onDisable() {
        System.out.println(ChatColor.AQUA + "-------------------------");
        System.out.println(ChatColor.LIGHT_PURPLE + "tpPlayer 插件已卸载");
        System.out.println(ChatColor.AQUA + "如需帮助，请参阅https://im.xz.cn/index.php/archives/59/");
        System.out.println(ChatColor.AQUA + "");
        System.out.println(ChatColor.AQUA + "作者：夏至锐(xzrui), QQ1214621621");
        System.out.println(ChatColor.AQUA + "");
        System.out.println(ChatColor.AQUA + "你好再见！");
        System.out.println(ChatColor.AQUA + "-------------------------");
        // Plugin shutdown logic
    }
}